Order-Sorted Polymorphism in Isabelle
نویسنده
چکیده
ML-style polymorphism can be generalized from a single-sorted algebra of types to an order-sorted one by adding a partially ordered layer of “sorts” on top of the types. Type inference proceeds as in the Hindley/Milner system, except that order-sorted unification of types is used. The resulting system has been implemented in Isabelle to permit type variables to range over user-definable subsets of all types. Order-sorted polymorphism allows a simple specification of type restrictions in many logical systems. It accommodates user-defined parametric overloading and allows for a limited form of abstract axiomatic reasoning. It can also explain type inference with Standard ML’s equality types and Haskell’s type classes.
منابع مشابه
Type Classes and Overloading in Higher-Order Logic
Type classes and overloading are shown to be independent concepts that can both be added to simple higher-order logics in the tradition of Church and Gordon, without demanding more logical expressiveness. In particular, model-theoretic issues are not affected. Our metalogical results may serve as a foundation of systems like Isabelle/Pure that offer the user Haskell-style order-sorted polymorph...
متن کاملA Method to Translate Order-Sorted Algebras to Many-Sorted Algebras
Order-sorted algebras and many sorted algebras exist in a long history with many different implementations and applications. A lot of language specifications have been defined in order-sorted algebra frameworks such as the language specifications in K (an order-sorted algebra framework). The biggest problem in a lot of the order-sorted algebra frameworks is that even if they might allow develop...
متن کاملLogic Programming over Polymorphically Order-Sorted Types
This thesis presents the foundations for relational logic programming over polymorphically order-sorted data types. This type discipline combines the notion of parametric polymorphism, which has been developed for higher-order functional programming, with the notion of order-sorted typing, which has been developed for equational rst-order speci cation and programming. Polymorphically order-sort...
متن کاملSorted Psi-calculi with Generalised Pattern Matching
Psi-calculi is a parametric framework for extensions of the pi-calculus, with arbitrary data structures and logical assertions for facts about data. In this paper we extend the applicability of psi-calculi in three ways. Firstly, we introduce patterns and pattern matching, in order to allow modelling of computations on the term language. Secondly, we add sorts to the data term language, to remo...
متن کاملType Inferencing for Polymorphic Order-Sorted Logic Programs
The purpose of this paper is to study the problem of complete type inferencing for polymorphic order-sorted logic programs. We show that previous approaches are incomplete even if one does not employ the full power of the used type systems. We present a complete type inferencing algorithm that covers the polymorphic order-sorted types in PROTOS-L, a logic programming language that allows for po...
متن کامل